<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Block Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__dma__block__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Block Functions<div class="ingroups"><a class="el" href="group__group__dma.html">DMA          (Direct Memory Access)</a> &raquo; <a class="el" href="group__group__dma__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad14b53935dc8321f395e49a7dfec2c5a"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__block__functions.html#gad14b53935dc8321f395e49a7dfec2c5a">Cy_DMA_Enable</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base)</td></tr>
<tr class="memdesc:gad14b53935dc8321f395e49a7dfec2c5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the DMA block.  <a href="#gad14b53935dc8321f395e49a7dfec2c5a">More...</a><br /></td></tr>
<tr class="separator:gad14b53935dc8321f395e49a7dfec2c5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gada1f6b4da0ec1e3c54c07173a1bd4357"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__block__functions.html#gada1f6b4da0ec1e3c54c07173a1bd4357">Cy_DMA_Disable</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base)</td></tr>
<tr class="memdesc:gada1f6b4da0ec1e3c54c07173a1bd4357"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the DMA block.  <a href="#gada1f6b4da0ec1e3c54c07173a1bd4357">More...</a><br /></td></tr>
<tr class="separator:gada1f6b4da0ec1e3c54c07173a1bd4357"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20b7caf0e766daf03db12644c8dff173"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__block__functions.html#ga20b7caf0e766daf03db12644c8dff173">Cy_DMA_GetActiveChannel</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base)</td></tr>
<tr class="memdesc:ga20b7caf0e766daf03db12644c8dff173"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status of the active/pending channels in the DMA block.  <a href="#ga20b7caf0e766daf03db12644c8dff173">More...</a><br /></td></tr>
<tr class="separator:ga20b7caf0e766daf03db12644c8dff173"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0698c79b971fea2cb67e230bd051d7bb"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__block__functions.html#ga0698c79b971fea2cb67e230bd051d7bb">Cy_DMA_GetActiveSrcAddress</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base)</td></tr>
<tr class="memdesc:ga0698c79b971fea2cb67e230bd051d7bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the source address being used for the current transfer.  <a href="#ga0698c79b971fea2cb67e230bd051d7bb">More...</a><br /></td></tr>
<tr class="separator:ga0698c79b971fea2cb67e230bd051d7bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac64ec6a9678090f2e89bf2a29dbf4a3d"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__block__functions.html#gac64ec6a9678090f2e89bf2a29dbf4a3d">Cy_DMA_GetActiveDstAddress</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base)</td></tr>
<tr class="memdesc:gac64ec6a9678090f2e89bf2a29dbf4a3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the destination address being used for the current transfer.  <a href="#gac64ec6a9678090f2e89bf2a29dbf4a3d">More...</a><br /></td></tr>
<tr class="separator:gac64ec6a9678090f2e89bf2a29dbf4a3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3ef821c63ecd6b0d33ded10db6ed618e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__dma__enums.html#gafbef983fffc7c7bb724322e8f64d32e5">cy_en_dma_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__block__functions.html#ga3ef821c63ecd6b0d33ded10db6ed618e">Cy_DMA_Crc_Init</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> *base, <a class="el" href="structcy__stc__dma__crc__config__t.html">cy_stc_dma_crc_config_t</a> const *crcConfig)</td></tr>
<tr class="memdesc:ga3ef821c63ecd6b0d33ded10db6ed618e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the DMA CRC functionality.  <a href="#ga3ef821c63ecd6b0d33ded10db6ed618e">More...</a><br /></td></tr>
<tr class="separator:ga3ef821c63ecd6b0d33ded10db6ed618e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c80b278b6fbf88ca8b4221a5d2fd139"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__dma__block__functions.html#ga9c80b278b6fbf88ca8b4221a5d2fd139">Cy_DMA_GetActiveChannelIndex</a> (<a class="el" href="struct_d_w___type.html">DW_Type</a> const *base)</td></tr>
<tr class="memdesc:ga9c80b278b6fbf88ca8b4221a5d2fd139"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the index of the active channel within the DMA block.  <a href="#ga9c80b278b6fbf88ca8b4221a5d2fd139">More...</a><br /></td></tr>
<tr class="separator:ga9c80b278b6fbf88ca8b4221a5d2fd139"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gad14b53935dc8321f395e49a7dfec2c5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad14b53935dc8321f395e49a7dfec2c5a">&#9670;&nbsp;</a></span>Cy_DMA_Enable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Enable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables the DMA block. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Initialize a 1D descriptor */</span></div><div class="line"><span class="preprocessor">    #define DATACNT (8UL)</span></div><div class="line"><span class="preprocessor">    #define CY_DMA_INTR_MASK (0x01UL)</span></div><div class="line"></div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> descriptor;</div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__t.html">cy_stc_dma_descriptor_t</a> nextDescriptor;</div><div class="line">    uint32_t src_data[DATACNT];</div><div class="line">    uint32_t dst_data[DATACNT];</div><div class="line">    uint8_t currentYIndex;</div><div class="line"></div><div class="line">    <span class="comment">/* Enabling the interrupt using the Cy_DMA_Channel_SetInterruptMask function for DMA channel.*/</span></div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gab3e0528d8e57ee04dbbee89ffca38545">Cy_DMA_Channel_SetInterruptMask</a>(DW0, 0UL, <a class="code" href="group__group__dma__macros.html#gadaa223697209effceea2fd4a8c957c86">CY_DMA_INTR_MASK</a>);</div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__dma__descriptor__config__t.html">cy_stc_dma_descriptor_config_t</a> descriptor_cfg = </div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__dma__descriptor__config__t.html#afcc039279bc1e7d50b0813778772f3c0">retrigger</a> = <a class="code" href="group__group__dma__enums.html#gga8ea649c82d5e7d4d4bd72403468aadeea0bf275b3b0a14445f5adb266865664ee">CY_DMA_RETRIG_IM</a>,</div><div class="line">        .interruptType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .triggerOutType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .channelState = <a class="code" href="group__group__dma__enums.html#gga75740ce8bf02f62bc9e6c86307369f67a7f4266bff1786e17ba9b892ba03334db">CY_DMA_CHANNEL_ENABLED</a>,</div><div class="line">        .triggerInType = <a class="code" href="group__group__dma__enums.html#gga46664f020f211baf0651e6c85c3c3e76ae49e9abd58d729c9875ce44e73b1b26b">CY_DMA_DESCR</a>,</div><div class="line">        .dataSize = <a class="code" href="group__group__dma__enums.html#gga167a5222a0d666c6ce9e8382e56ac192a06aa9f141fdba0572953b0ffe8972ccc">CY_DMA_WORD</a>,</div><div class="line">        .srcTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .dstTransferSize = <a class="code" href="group__group__dma__enums.html#gga2e6a1fad6945ca581ebd0fdbb8748314a559ffa18c8d6862e31c444eed54de51e">CY_DMA_TRANSFER_SIZE_WORD</a>,</div><div class="line">        .descriptorType = <a class="code" href="group__group__dma__enums.html#gga69516534f5a562e8a2f55bb4203851d0a7d12c181e7b926a71c7c30eb77ac8955">CY_DMA_1D_TRANSFER</a>,</div><div class="line">        .srcAddress = &amp;src_data,</div><div class="line">        .dstAddress = &amp;dst_data,</div><div class="line">        .srcXincrement = 1U,</div><div class="line">        .dstXincrement = 1U,</div><div class="line">        .xCount = DATACNT,</div><div class="line">        .srcYincrement = 0U,</div><div class="line">        .dstYincrement = 0U,</div><div class="line">        .yCount = 1UL,</div><div class="line">        .nextDescriptor = &amp;nextDescriptor,</div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__descriptor__functions.html#gab1610fab6f2dd5fd25c031ac0aa9d8cb">Cy_DMA_Descriptor_Init</a>(&amp;descriptor, &amp;descriptor_cfg))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Setup and enable the DMA channel 0 of block DW0 */</span></div><div class="line">    <a class="code" href="structcy__stc__dma__channel__config__t.html">cy_stc_dma_channel_config_t</a> channelConfig;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aab3204617ecee2a57b1f76832966227d">preemptable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#a018bbd8e3039b78ad16f9c0536dde3c0">enable</a> = <span class="keyword">false</span>;</div><div class="line">    channelConfig.<a class="code" href="structcy__stc__dma__channel__config__t.html#aa40017613f97a28e2802e072fdf38817">bufferable</a> = <span class="keyword">false</span>;</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__channel__functions.html#gab0beed3c05362206ac66fc4327d8964b">Cy_DMA_Channel_Init</a>(DW0, 0UL, &amp;channelConfig))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga4c5cca40de761c4b7827ce65538bf12d">Cy_DMA_Channel_SetDescriptor</a>(DW0, 0UL, &amp;descriptor);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#gae088032ef5679610fdcbea8d1b4a3cd3">Cy_DMA_Channel_SetPriority</a>(DW0, 0UL, 3UL);</div><div class="line">    <a class="code" href="group__group__dma__channel__functions.html#ga13e6923cafe660ba825ba6d5b1841bf7">Cy_DMA_Channel_Enable</a>(DW0, 0UL);</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__dma__block__functions.html#gad14b53935dc8321f395e49a7dfec2c5a">Cy_DMA_Enable</a>(DW0);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__dma__channel__functions.html#ga5a51ce188be53678509a623517d96f16">Cy_DMA_Channel_IsEnabled</a>(DW0, 0UL))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    currentYIndex = <a class="code" href="group__group__dma__channel__functions.html#gaceff87bfa4f24dfde2764ea8c45a1ecd">Cy_DMA_Channel_GetCurrentYIndex</a>(DW0, 0UL);</div><div class="line">    (void) currentYIndex;</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gada1f6b4da0ec1e3c54c07173a1bd4357"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gada1f6b4da0ec1e3c54c07173a1bd4357">&#9670;&nbsp;</a></span>Cy_DMA_Disable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_DMA_Disable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables the DMA block. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Disable the DMA channel 0 of block DW0 if it&#39;s priority equals 3 */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (3UL == <a class="code" href="group__group__dma__channel__functions.html#ga29e33eb65906b09e28669d62d2e1b546">Cy_DMA_Channel_GetPriority</a>(DW0, 0UL))</div><div class="line">    {    </div><div class="line">        <span class="keywordflow">if</span> (0UL != <a class="code" href="group__group__dma__block__functions.html#ga20b7caf0e766daf03db12644c8dff173">Cy_DMA_GetActiveChannel</a>(DW0))</div><div class="line">        {</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#ga84ff3039034f39eb11962f19b1b2bae1">Cy_DMA_Channel_Disable</a>(DW0, 0UL);</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#gae2821469d78001afc568b0e484f684c1">Cy_DMA_Channel_DeInit</a>(DW0, 0UL);</div><div class="line"></div><div class="line">            <span class="comment">/* if needed (if there is only channel used) the whole block can be disabled */</span></div><div class="line">            <a class="code" href="group__group__dma__block__functions.html#gada1f6b4da0ec1e3c54c07173a1bd4357">Cy_DMA_Disable</a>(DW0);</div><div class="line">        }</div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga20b7caf0e766daf03db12644c8dff173"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga20b7caf0e766daf03db12644c8dff173">&#9670;&nbsp;</a></span>Cy_DMA_GetActiveChannel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_DMA_GetActiveChannel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the status of the active/pending channels in the DMA block. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>For DW Version 1 based devices, returns a bit-field with all of the currently active/pending channels in the DMA block.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>For DW Version 2 based devices, returns a bit-field with first 32 channels currently active/pending in the DMA block. In addition to this, user can get the active channel index using <a class="el" href="group__group__dma__block__functions.html#ga9c80b278b6fbf88ca8b4221a5d2fd139">Cy_DMA_GetActiveChannelIndex</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Disable the DMA channel 0 of block DW0 if it&#39;s priority equals 3 */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (3UL == <a class="code" href="group__group__dma__channel__functions.html#ga29e33eb65906b09e28669d62d2e1b546">Cy_DMA_Channel_GetPriority</a>(DW0, 0UL))</div><div class="line">    {    </div><div class="line">        <span class="keywordflow">if</span> (0UL != <a class="code" href="group__group__dma__block__functions.html#ga20b7caf0e766daf03db12644c8dff173">Cy_DMA_GetActiveChannel</a>(DW0))</div><div class="line">        {</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#ga84ff3039034f39eb11962f19b1b2bae1">Cy_DMA_Channel_Disable</a>(DW0, 0UL);</div><div class="line">            <a class="code" href="group__group__dma__channel__functions.html#gae2821469d78001afc568b0e484f684c1">Cy_DMA_Channel_DeInit</a>(DW0, 0UL);</div><div class="line"></div><div class="line">            <span class="comment">/* if needed (if there is only channel used) the whole block can be disabled */</span></div><div class="line">            <a class="code" href="group__group__dma__block__functions.html#gada1f6b4da0ec1e3c54c07173a1bd4357">Cy_DMA_Disable</a>(DW0);</div><div class="line">        }</div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga0698c79b971fea2cb67e230bd051d7bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0698c79b971fea2cb67e230bd051d7bb">&#9670;&nbsp;</a></span>Cy_DMA_GetActiveSrcAddress()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void * Cy_DMA_GetActiveSrcAddress </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the source address being used for the current transfer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the pointer to the source of transfer.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Make sure the array is not in use before modifying the array */</span></div><div class="line">    </div><div class="line">    uint32_t array[16];</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (((<span class="keywordtype">void</span>*) array != <a class="code" href="group__group__dma__block__functions.html#ga0698c79b971fea2cb67e230bd051d7bb">Cy_DMA_GetActiveSrcAddress</a>(DW0)) &amp;&amp;</div><div class="line">        ((<span class="keywordtype">void</span>*) array != <a class="code" href="group__group__dma__block__functions.html#gac64ec6a9678090f2e89bf2a29dbf4a3d">Cy_DMA_GetActiveDstAddress</a>(DW0)))</div><div class="line">    {    </div><div class="line">        <span class="comment">/* Modify the array content here */</span></div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gac64ec6a9678090f2e89bf2a29dbf4a3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac64ec6a9678090f2e89bf2a29dbf4a3d">&#9670;&nbsp;</a></span>Cy_DMA_GetActiveDstAddress()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void * Cy_DMA_GetActiveDstAddress </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the destination address being used for the current transfer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the pointer to the destination of transfer.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Make sure the array is not in use before modifying the array */</span></div><div class="line">    </div><div class="line">    uint32_t array[16];</div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (((<span class="keywordtype">void</span>*) array != <a class="code" href="group__group__dma__block__functions.html#ga0698c79b971fea2cb67e230bd051d7bb">Cy_DMA_GetActiveSrcAddress</a>(DW0)) &amp;&amp;</div><div class="line">        ((<span class="keywordtype">void</span>*) array != <a class="code" href="group__group__dma__block__functions.html#gac64ec6a9678090f2e89bf2a29dbf4a3d">Cy_DMA_GetActiveDstAddress</a>(DW0)))</div><div class="line">    {    </div><div class="line">        <span class="comment">/* Modify the array content here */</span></div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga3ef821c63ecd6b0d33ded10db6ed618e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3ef821c63ecd6b0d33ded10db6ed618e">&#9670;&nbsp;</a></span>Cy_DMA_Crc_Init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__dma__enums.html#gafbef983fffc7c7bb724322e8f64d32e5">cy_en_dma_status_t</a> Cy_DMA_Crc_Init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__dma__crc__config__t.html">cy_stc_dma_crc_config_t</a> const *&#160;</td>
          <td class="paramname"><em>crcConfig</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the DMA CRC functionality. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
    <tr><td class="paramname">crcConfig</td><td>The pointer to the CRC configuration structure <a class="el" href="structcy__stc__dma__crc__config__t.html">cy_stc_dma_crc_config_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status /ref cy_en_dma_status_t.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: Setup the CRC for DMA block DW0 */</span></div><div class="line">    <a class="code" href="structcy__stc__dma__crc__config__t.html">cy_stc_dma_crc_config_t</a> crcConfig =</div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__dma__crc__config__t.html#acc5d2168ecef8a82b46614f861f0985c">dataReverse</a> = <span class="keyword">false</span>,</div><div class="line">        .dataXor = 0x00000000UL,</div><div class="line">        .polynomial = 0x04C11DB7UL,</div><div class="line">        .reminderReverse = <span class="keyword">false</span>,</div><div class="line">        .reminderXor = 0x00000000UL,</div><div class="line">        .lfsrInitVal = 0xFFFFFFFFUL</div><div class="line">    };</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__dma__enums.html#ggafbef983fffc7c7bb724322e8f64d32e5a5223359d0e1e316300e678afaa8cee96">CY_DMA_SUCCESS</a> != <a class="code" href="group__group__dma__block__functions.html#ga3ef821c63ecd6b0d33ded10db6ed618e">Cy_DMA_Crc_Init</a>(DW0, &amp;crcConfig))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga9c80b278b6fbf88ca8b4221a5d2fd139"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c80b278b6fbf88ca8b4221a5d2fd139">&#9670;&nbsp;</a></span>Cy_DMA_GetActiveChannelIndex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_DMA_GetActiveChannelIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_d_w___type.html">DW_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the index of the active channel within the DMA block. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the hardware DMA block.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>active channel index if present otherwise <a class="el" href="group__group__dma__macros.html#ga78440c335fe1a744b8a4e98a560a893c">CY_DMA_NO_ACTIVE_CHANNELS</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
